<template>
<div class="sign-mod-TempAllElems">
    <!-- 通用-矩形 -->
    <SignSquare
        v-if='tempData.tempType === "SignSquare"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></SignSquare>
    <!-- 通用-圆形 -->
    <SignCircular
        v-if='tempData.tempType === "SignCircular"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></SignCircular>
    <!-- 通用-图片 -->
    <CommonImgBox
        v-if='tempData.tempType === "CommonImgBox"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></CommonImgBox>
    <!-- 通用-直线 -->
    <SignStraightLine
        v-if='tempData.tempType === "SignStraightLine"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></SignStraightLine>
    <!-- 通用-虚线 -->
    <SignDottedLine
        v-if='tempData.tempType === "SignDottedLine"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></SignDottedLine>
    <!-- 通用-通用表格 -->
    <CommonTable
        v-if='tempData.tempType === "CommonTable"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></CommonTable>
    <!-- 通用-查询表格 -->
    <QueryTable
        v-if='tempData.tempType === "QueryTable"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></QueryTable>

    <!-- 输入框-文本 -->
    <SignInput
        v-if='tempData.tempType === "SignInput"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></SignInput>
    <!-- 输入框-文本域 -->
    <SignTextarea
        v-if='tempData.tempType === "SignTextarea"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></SignTextarea>

    

    <!-- 图表群 -->
    <EchartItem1
        v-if='tempData.tempType === "EchartItem1"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></EchartItem1>
    <EchartItem2
        v-if='tempData.tempType === "EchartItem2"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></EchartItem2>
    <EchartItem3
        v-if='tempData.tempType === "EchartItem3"'
        :ref='tempData.tempType + tempData.dataKey'
        @updateSignTempData='updateSignTempData'
        :templateId='templateId'
        :briefingDetailId='briefingDetailId'
        :tempData='tempData'></EchartItem3>

    
    
    
</div>
</template>

<script>
// 通用-矩形
import SignSquare from '/@/views/visualEditTemp/tempElems/commons/SignSquare.vue'
// 通用-圆形
import SignCircular from '/@/views/visualEditTemp/tempElems/commons/SignCircular.vue'
// 通用-图片
import CommonImgBox from '/@/views/visualEditTemp/tempElems/commons/CommonImgBox.vue'
// 通用-直线
import SignStraightLine from '/@/views/visualEditTemp/tempElems/commons/SignStraightLine.vue'
// 通用-虚线
import SignDottedLine from '/@/views/visualEditTemp/tempElems/commons/SignDottedLine.vue'
// 通用-通用表格
import CommonTable from '/@/views/visualEditTemp/tempElems/commons/CommonTable.vue'
// 通用-查询表格
import QueryTable from '/@/views/visualEditTemp/tempElems/commons/QueryTable.vue'


// 输入框-文本
import SignInput from '/@/views/visualEditTemp/tempElems/inputs/SignInput.vue'
// 输入框-文本域
import SignTextarea from '/@/views/visualEditTemp/tempElems/inputs/SignTextarea.vue'



//图表群
import EchartItem1 from '/@/views/visualEditTemp/tempElems/echarts/EchartItem1.vue'
import EchartItem2 from '/@/views/visualEditTemp/tempElems/echarts/EchartItem2.vue'
import EchartItem3 from '/@/views/visualEditTemp/tempElems/echarts/EchartItem3.vue'





export default {
    name: 'TempAllElems',
    props: {
        // 列表数据
        tempData: {
            type: Object,
            default : function () {
                return {
                    tempType: '',
                };
            }
        },
        // 模板id
        templateId: {
            type: String,
            default : function () {
                return '';
            }
        },
        // 内容id
        briefingDetailId: {
            type: String,
            default : function () {
                return '';
            }
        }
    },
    components: {
        'SignSquare':   SignSquare,
        'SignCircular': SignCircular,
        'SignStraightLine': SignStraightLine,
        'SignDottedLine': SignDottedLine,
        //文本框
        'SignInput':        SignInput,
        'SignTextarea':     SignTextarea,

        //通用-通用表格
        'CommonTable':      CommonTable,
        //通用-查询表格
        'QueryTable':      QueryTable,

        //图表群
        'EchartItem1':    EchartItem1,
        'EchartItem2':    EchartItem2,
        'EchartItem3':    EchartItem3,

        //其它
        'CommonImgBox':    CommonImgBox
        
        
    },
    data () {
        return {
        }
    },
    methods: {
        // 供子级调用-更新子数据
        updateSignTempData (tempData) {
            this.$emit('updateSignTempData', tempData);
        },
        // 供父级调用-调用子级的保存函数
        saveSignTempForChild () {
            this.$refs[this.tempData.tempType + this.tempData.dataKey].saveSignTempForChild();
        },
    },
    
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.sign-mod-TempAllElems{ height: 100%; }
</style>
